package com.scau402.system.service.impl;

import java.util.List;
import com.scau402.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scau402.system.mapper.WmsStreamStudioMapper;
import com.scau402.system.domain.WmsStreamStudio;
import com.scau402.system.service.IWmsStreamStudioService;

/**
 * 直播间Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-26
 */
@Service
public class WmsStreamStudioServiceImpl implements IWmsStreamStudioService 
{
    @Autowired
    private WmsStreamStudioMapper wmsStreamStudioMapper;

    /**
     * 查询直播间
     * 
     * @param id 直播间主键
     * @return 直播间
     */
    @Override
    public WmsStreamStudio selectWmsStreamStudioById(Long id)
    {
        return wmsStreamStudioMapper.selectWmsStreamStudioById(id);
    }

    /**
     * 查询直播间列表
     * 
     * @param wmsStreamStudio 直播间
     * @return 直播间
     */
    @Override
    public List<WmsStreamStudio> selectWmsStreamStudioList(WmsStreamStudio wmsStreamStudio)
    {
        return wmsStreamStudioMapper.selectWmsStreamStudioList(wmsStreamStudio);
    }

    /**
     * 新增直播间
     * 
     * @param wmsStreamStudio 直播间
     * @return 结果
     */
    @Override
    public int insertWmsStreamStudio(WmsStreamStudio wmsStreamStudio)
    {
        wmsStreamStudio.setCreateTime(DateUtils.getNowDate());
        return wmsStreamStudioMapper.insertWmsStreamStudio(wmsStreamStudio);
    }

    /**
     * 修改直播间
     * 
     * @param wmsStreamStudio 直播间
     * @return 结果
     */
    @Override
    public int updateWmsStreamStudio(WmsStreamStudio wmsStreamStudio)
    {
        wmsStreamStudio.setUpdateTime(DateUtils.getNowDate());
        return wmsStreamStudioMapper.updateWmsStreamStudio(wmsStreamStudio);
    }

    /**
     * 批量删除直播间
     * 
     * @param ids 需要删除的直播间主键
     * @return 结果
     */
    @Override
    public int deleteWmsStreamStudioByIds(Long[] ids)
    {
        return wmsStreamStudioMapper.deleteWmsStreamStudioByIds(ids);
    }

    /**
     * 删除直播间信息
     * 
     * @param id 直播间主键
     * @return 结果
     */
    @Override
    public int deleteWmsStreamStudioById(Long id)
    {
        return wmsStreamStudioMapper.deleteWmsStreamStudioById(id);
    }
}
